/*******************************************************************
 *
 * Copyright (C), 2021-2022, LS, All rights reserved.
 *
 * Author      : 
 * Create Time : 2021-09-17
 * Version     : v0.1
 * Description : 
 *******************************************************************/

#ifndef _LS_BLE_ADPTER_H_
#define _LS_BLE_ADPTER_H_

/*----------------------------Head file----------------------------*/
#include "mcu.h"
#include "stdint.h"
#include "stdbool.h"

/*----------------------------macro file---------------------------*/
#define ls_ble_adpter_enter_critical()        HAL_ENTER_CRITICAL_SECTION()
#define ls_ble_adpter_exit_critical()         HAL_EXIT_CRITICAL_SECTION()

/*----------------------------type define--------------------------*/

/*----------------------------var define---------------------------*/							

/*-------------------------func declaration------------------------*/
extern void ls_ble_adpter_log_putc(uint8_t* data, uint16_t size);
extern void ls_ble_adpter_platform_reset(void);
extern void ls_ble_adpter_wdt_feed(void);
extern bool ls_ble_adpter_flash_erase_sector(const uint32_t addr);
extern uint32_t ls_ble_adpter_flash_write(const uint32_t addr, const uint8_t *buf, const uint32_t size);
extern uint32_t ls_ble_adpter_flash_read(const uint32_t addr, uint8_t *buf, const uint32_t size);

/*-----------------------------------------------------------------*/


#endif
